import { PRODUCT } from './api'
import { METHOD, request } from '@/utils/request'

export async function productDetail(id) {
  return request(PRODUCT + '/queryOne', METHOD.GET, { id: id })
}

export async function productPage(data) {
  return request(PRODUCT + '/page', METHOD.POST, data)
}

export async function productSaveOrUpdate(data) {
  return request(PRODUCT + '/saveOrUpdate', METHOD.POST, data)
}

export default { productPage, productDetail, productSaveOrUpdate }